% 各种符号、术语

\newcounter{char}
\setcounter{char}{1}
\loop\ifnum\value{char}<27
  \expandafter\edef\csname c\Alph{char}\endcsname{\noexpand\symcal{\Alph{char}}}  % mathcal
  \expandafter\edef\csname b\Alph{char}\endcsname{\noexpand\symbf{\Alph{char}}}  % mathcal
  \expandafter\edef\csname \Alph{char}\Alph{char}\endcsname{\noexpand\symbb{\Alph{char}}}   % mathbb
  \expandafter\edef\csname fr\Alph{char}\endcsname{\noexpand\mathfrak{\Alph{char}}} % mathfrak
  \expandafter\edef\csname fr\alph{char}\endcsname{\noexpand\mathfrak{\alph{char}}} % mathfrak
  \expandafter\edef\csname e\Alph{char}\endcsname{\noexpand\symsf{\Alph{char}}}   % mathsf
  \expandafter\edef\csname r\Alph{char}\endcsname{\noexpand\mathrm{\Alph{char}}}   % mathrm
  \expandafter\edef\csname s\Alph{char}\endcsname{\noexpand\symscr{\Alph{char}}}  % mathscr
  \addtocounter{char}{1}
\repeat

\newcommand{\Ann}{\operatorname{Ann}}
\newcommand{\Ass}{\operatorname{Ass}}
\newcommand{\Aut}{\operatorname{Aut}}
\newcommand{\Bs}{\operatorname{Bs}}
\newcommand{\Coker}{\operatorname{Coker}}
\newcommand{\Cong}{\operatorname{cong}}
\newcommand{\Content}{\operatorname{Content}}
\newcommand{\Div}{\operatorname{div}}
\newcommand{\Dom}{\operatorname{Dom}}
\newcommand{\End}{\operatorname{End}}
\newcommand{\Ext}{\operatorname{Ext}}
\newcommand{\Ex}{\operatorname{Ex}}
\newcommand{\GL}{\operatorname{GL}}
\newcommand{\Hom}{\operatorname{Hom}}
\newcommand{\Inj}{\operatorname{Inj}}
\newcommand{\Ker}{\operatorname{Ker}}
\newcommand{\Map}{\operatorname{Map}}
\newcommand{\Frac}{\operatorname{Frac}}
\newcommand{\Max}{\operatorname{Max}}
\newcommand{\Mod}{\operatorname{Mod}}
\newcommand{\Null}{\operatorname{null}}
\newcommand{\Num}{\operatorname{Num}}
\newcommand{\PGL}{\operatorname{PGL}}
\newcommand{\PROJ}{\operatorname{\symbf{Proj}}}
\newcommand{\PSh}{\operatorname{PSh}}
\newcommand{\Pic}{\operatorname{Pic}}
\newcommand{\Proj}{\operatorname{Proj}}
\newcommand{\Qcoh}{\operatorname{Qcoh}}
\newcommand{\Res}{\operatorname{Res}}
\newcommand{\SL}{\operatorname{SL}}
\newcommand{\Sh}{\operatorname{Sh}}
\newcommand{\Sing}{\operatorname{Sing}}
\newcommand{\Span}{\operatorname{Span}}
\newcommand{\Spec}{\operatorname{Spec}}
\newcommand{\Supp}{\operatorname{Supp}}
\newcommand{\Sym}{\operatorname{Sym}}
\newcommand{\Syl}{\operatorname{Syl}}
\newcommand{\Tor}{\operatorname{Tor}}
\newcommand{\Vect}{\operatorname{Vect}}
\newcommand{\adj}{\operatorname{adj}}
\newcommand{\ann}{\operatorname{Ann}}
\newcommand{\codim}{\operatorname{codim}}
\newcommand{\cof}{\operatorname{cof}}
\newcommand{\coh}{\operatorname{coh}}
\newcommand{\coker}{\operatorname{Coker}}
\newcommand{\congm}{\operatorname{cong}}
\newcommand{\depth}{\operatorname{depth}}
\newcommand{\diag}{\operatorname{diag}}
\newcommand{\diff}{\mathrm{d}}
\newcommand{\disc}{\operatorname{disc}}
\newcommand{\discrep}{\operatorname{discrep}}
\newcommand{\totaldiscrep}{\operatorname{totaldiscrep}}
\newcommand{\ev}{\operatorname{ev}}
\newcommand{\grade}{\operatorname{grade}}
\newcommand{\gr}{\operatorname{gr}}
\newcommand{\height}{\operatorname{ht}}
\newcommand{\id}{\operatorname{id}}
\newcommand{\im}{\operatorname{Im}}
\newcommand{\ind}{\operatorname{ind}}
\newcommand{\kronecker}[2]{\genfrac{(}{)}{}{}{#1}{#2}}
\newcommand{\lcm}{\operatorname{lcm}}
\newcommand{\length}{\operatorname{length}}
\newcommand{\mult}{\operatorname{mult}}
\newcommand{\norm}[1]{\lVert #1 \rVert}
\newcommand{\ord}{\operatorname{ord}}
\newcommand{\pair}[1]{\langle #1 \rangle}
\newcommand{\perf}{\operatorname{perf}}
\newcommand{\proj}{\operatorname{proj}}
\newcommand{\rad}{\operatorname{rad}}
\newcommand{\rank}{\operatorname{rank}}
\newcommand{\sHom}{\sH\kern-1pt om}
\newcommand{\sgn}{\operatorname{sgn}}
\newcommand{\spec}{\operatorname{Spec}}
\newcommand{\spm}{\operatorname{Spm}}
\newcommand{\supp}{\operatorname{Supp}}
\newcommand{\tr}{\operatorname{tr}}
\renewcommand{\ker}{\operatorname{Ker}}
\renewcommand{\mod}{\operatorname{mod}}


\newcommand{\roundup}[1]{\lceil #1 \rceil}
\newcommand{\rounddown}[1]{\lfloor #1 \rfloor}
\newcommand{\Roundup}[1]{\left\lceil #1 \right\rceil}
\newcommand{\Rounddown}[1]{\left\lfloor #1 \right\rfloor}

\renewcommand{\leadsto}{\rightsquigarrow}
\newcommand\tinybullet{\vcenter{\hbox{\tiny$\bullet$}}}
\newcommand{\eqdef}{\overset{\textup{def}}{=}}
\renewcommand{\iff}{\,\textbf{\textup{iff}}\,}
\newcommand{\op}{\textup{op}}
\providecommand{\square}{\ensuremath{\mdlgwhtsquare}}

% 圆圈数字用于标记步骤之类
\providecommand\circled[1]{\raisebox{1pt}{\tikz[baseline=(char.base)]{\node[circle,draw,inner sep=1pt] (char) {\scriptsize #1};}}}
\providecommand\dashrightarrow{\rightdasharrow}

